package com.star95.springbooti18n.dto;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Data
@NoArgsConstructor
public class CustomerUserDto {
    /**
     * 账号
     */
    @NotEmpty(message = "{customer_account_not_empty}")
    private String customerAccount;

    /**
     * 密码
     */
    @NotEmpty(message = "{password_not_empty}")
    private String password;

    /**
     * 验证码
     */
    @NotEmpty(message = "{captcha_not_empty}")
    @Length(min = 1, max = 4, message = "{captcha_length_error}")
    private String captcha;

    /**
     * 验证码key
     */
    @NotNull(message = "{captchaKey_not_null}")
    private String captchaKey;

    @Min(value = 0, message = "{age_min_error}")
    private int age;
}
